package com.along.fastexcel.entity;

import cn.idev.excel.annotation.ExcelProperty;

import java.io.Serializable;

/*
 * @Author: liujinyi
 * @DateTime: 2025/1/15 9:32
 */
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelProperty("编号")
    private int id;
    @ExcelProperty("名字")
    private String name;
    @ExcelProperty("年龄")
    private int age;

    // 构造函数、getter 和 setter 方法

    public User setId(int id) {
        this.id = id;
        return this; // 返回当前对象以支持链式调用
    }

    public User setName(String name) {
        this.name = name;
        return this; // 返回当前对象以支持链式调用
    }

    public User setAge(int age) {
        this.age = age;
        return this; // 返回当前对象以支持链式调用
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
